﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Runtime.Serialization;
using System.Text;
using System.Xml.Linq;

namespace System
{
    [Serializable]
    public struct PointD : ISerializable
    {

        public PointD(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }

        public double X { get; set; }
        public double Y { get; set; }
        private PointD(SerializationInfo info, StreamingContext context)
        {
            this.X = info.GetDouble("x");
            this.Y = info.GetDouble("y");
        }

        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            if (info == null)
            {
                return;
            }
            info.AddValue("x", X);
            info.AddValue("y", Y);
        }

        public override string ToString()
        {
            return $"{X},{Y}";
        }

       
         
    }
}
